<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="head.jsp"%>

<!--查询页-->
  <div class="top_center">
    <form method="post" action="<%=request.getContextPath()%>/orderForm?type=seek" class="center_form">
      <span>房型:</span>
      <select name="houseTypeId" id="top_center_select">
      <option value="0">全部</option>
      <c:if test="${showList != null}">
        <c:forEach items="${showList}" var="show">
          <option value="${show.id}" <c:if test="${show.id == houseTypeId}">selected</c:if>>${show.houseType}</option>
        </c:forEach>
      </c:if>
    </select>
      <span>状态:</span>
      <select name="condition" id="top_center_select1">
      <option value="0" <c:if test="${condition == 0}">selected</c:if>>全部</option>
      <option value="1" <c:if test="${condition == 1}">selected</c:if>>入住</option>
      <option value="2" <c:if test="${condition == 2}">selected</c:if>>预约</option>
      <option value="-1" <c:if test="${condition == -1}">selected</c:if>>退房</option>
      </select>
      <span>房间号:</span>
      <input type="search" name="roomNumber" value="${roomNumber}" class="top_center_input">
      <span>姓名:</span>
      <input type="search" name="manageName"  value="${manageName}" class="top_center_input">
      <input type="submit" value="查询" class="top_center_submit">
      <span>
        <a href="<%=request.getContextPath()%>/orderForm?type=show">添加客户</a>
      </span>
    </form>
  </div>
  <div class="center_menu">
    <table class="menu_table" border="1" cellpadding="0" cellspacing="0" bordercolor="#F1F1F1">
      <tr class="head_tr">
        <td>订单号</td>
        <td>房型</td>
        <td>房间号</td>
        <td>客户名</td>
        <td>入住人数</td>
        <td>手机号</td>
        <td>身份证号</td>
        <td>入住时间</td>
        <td>退房时间</td>
        <td>金额</td>
        <td>操作</td>
      </tr>
      <c:if test="${paging.productList != null}">
        <c:forEach var="paging" items="${paging.productList}">
          <tr>
            <td>${paging.password}</td>
            <td>${paging.houseType.houseType}</td>
            <td>${paging.roomNumber}</td>
            <td>${paging.manageName}</td>
            <td>${paging.personNum}</td>
            <td>${paging.mobilePhone}</td>
            <td>${paging.identityCard}</td>
            <td>${paging.checkInDate}</td>
            <td>${paging.checkOutDate}</td>
            <td>${paging.price}</td>
            <td>
              <a href="<%=request.getContextPath()%>/orderForm?type=check&roomNumber=${paging.roomNumber}">编辑</a>
              <a href="<%=request.getContextPath()%>/orderForm?type=checkOut&roomNumber=${paging.roomNumber}">退房</a>
            </td>
          </tr>
        </c:forEach>
      </c:if>
      <c:if test="${paging.productList == null}">
        <p>
          没用查找找到叫${manageName}的客户
        </p>
      </c:if>
    </table>
    <p class="page_p">
      <a href="<%=request.getContextPath()%>/orderForm?manageName=${manageName}&condition=${condition}&houseTypeId=${houseTypeId}&roomNumber=${roomNumber}&index=1">首页</a>
      <a href="<%=request.getContextPath()%>/orderForm?manageName=${manageName}&condition=${condition}&houseTypeId=${houseTypeId}&roomNumber=${roomNumber}&index=${paging.currPageNo - 1}">上一页</a>
      <span>
            第${paging.currPageNo}页/共${paging.totalPageCount}页
        </span>
      <a href="<%=request.getContextPath()%>/orderForm?manageName=${manageName}&condition=${condition}&houseTypeId=${houseTypeId}&roomNumber=${roomNumber}&index=${paging.currPageNo + 1}">下一页</a>
      <a href="<%=request.getContextPath()%>/orderForm?manageName=${manageName}&condition=${condition}&houseTypeId=${houseTypeId}&roomNumber=${roomNumber}&index=${paging.totalPageCount}">末页</a>
    </p>
  </div>
</body>
</html>